use "ESS.dta", clear

 
global controls "Female Citizen trend  i.essround"
global FE "i.yrbrn i.Country"


quietly: reg Meritocracy Bologna $controls $FE  if University==1, vce(cluster Country)
gen sample_m=e(sample)
 

capture erase "Table1a.tex"


quietly eststo m1: reg Meritocracy Bologna if University==1 & short==1 & sample_m==1, vce(cluster Country)
	quietly: sum Meritocracy if short==1 & University==1
	estadd scalar ymean = r(mean)


quietly eststo m2: reg Meritocracy Bologna $controls $FE if University==1 & short==1, vce(cluster Country)
	quietly: sum Meritocracy if short==1 & University==1
	estadd scalar ymean = r(mean)
	
quietly eststo m2y: reg Meritocracy Bologna $controls $FE if University==1 & short==1 & yrbrn<1987, vce(cluster Country)
	quietly: sum Meritocracy if short==1 & University==1  & yrbrn<1987
	estadd scalar ymean = r(mean)
	
quietly eststo m3: reg Meritocracy Bologna $controls $FE if University==1 & short==1 & ImmigrantN==0, vce(cluster Country)
	quietly: sum Meritocracy if short==1 & University==1  & ImmigrantN==0
	estadd scalar ymean = r(mean)  

quietly eststo m4: reg Meritocracy Bologna $controls $FE if University==1 & short==1, vce(cluster Country)
	quietly: sum Meritocracy if short==1 & Eduyears>14   
	estadd scalar ymean = r(mean)	
	
 replace Bologna=Bologna2
 replace trend=trend2  

quietly eststo m5: reg Meritocracy Bologna $controls $FE if University==1 & short==1 , vce(cluster Country)
	quietly: sum Meritocracy if short==1 & University==1 
	estadd scalar ymean = r(mean)

use "ESS.dta", clear

quietly eststo m6: reg Meritocracy Bologna $controls $FE if University==1 & short==1 & Jump==0, vce(cluster Country)
	quietly: sum Meritocracy if short==1 & University==1  & Jump==0
	estadd scalar ymean = r(mean)
		
	
	g M2=Meritocracy
	replace Meritocracy=Meritocracy_ordinal
quietly eststo m7: reg Meritocracy Bologna $controls $FE if University==1 & short==1, vce(cluster Country)
	quietly: sum Meritocracy if short==1 & University==1
	estadd scalar ymean = r(mean)
	replace Meritocracy=M2
	
quietly eststo m8: reg Meritocracy Bologna $controls $FE if University==1 , vce(cluster Country)
	quietly: sum Meritocracy if  University==1
	estadd scalar ymean = r(mean)
	
	replace Bologna=Bologna_g
 quietly eststo m9: reg Meritocracy Bologna $controls $FE if University==1 & short==1, vce(cluster Country)
	quietly: sum Meritocracy if short==1 & University==1
	estadd scalar ymean = r(mean)
	replace Bologna=replaceBologna
	
		
quietly eststo m10: reg Meritocracy Bologna c.Bologna#c.University University $controls $FE if short==1, vce(cluster Country)  
	quietly: sum Meritocracy  if short==1 & University==1 
	estadd scalar ymean = r(mean)
	
	
	noisily esttab m1 m2 m3  m5 m4 m6 m7 m8 m9 m10 using "Table1a.tex",  nolz  keep(Bologna c.Bologna#c.University )  booktabs label  b(3) se(3) star(* 0.10 ** 0.05 *** 0.01) mtitles("\shortstack{Baseline  \\ \textcolor{white}{tentenna}}" "\shortstack{Main  \\ TWFE}" "\shortstack{Exclude  \\  immigrants}" "\shortstack{Average  \\  entry age}"  "\shortstack{Include  \\  droputs}"  "\shortstack{Exclude  \\  jump}" "\shortstack{Ordinal  \\ DV}" "\shortstack{Long  \\ bwidths}" "\shortstack{Gradual \\ reform}"   "\shortstack{Triple \\ DiD}" )  mgroups("\shortstack{\textbf{\normalsize OLS}\vspace*{.1cm}}" "\shortstack{\textbf{\normalsize Staggered DiD (TWFE)}\vspace*{.1cm}}", pattern(0  1  0 0 0 0 0 0 0 0 ) prefix(\multicolumn{@span}{c}{) suffix(})  span erepeat(\cmidrule(lr){@span}))  stats(ymean r2   N, fmt(3 3  %9.0fc) labels(`"Output mean"' `"\textit{R}-sq"'   `"N. Obs"')) nonotes  noobs nonumbers  noeqlines coeflabels(Bologna "Reform" c.Bologna#c.University "Reform $\times$ Graduate")  ///
	 prehead("\begin{table}[htbp]\centering \footnotesize \def\sym#1{\ifmmode^{#1}\else\(^{#1}\)\fi}   \caption{\scshape The Bologna reform and the neoliberal student \label{tabMain}}  \begin{center}   \begin{threeparttable}   \begin{tabular}{l  cccccccccc} \toprule" )  ///
	 prefoot("[1.5ex] \cmidrule(lr{0.15em}){1-11}" ) ///
	 posthead("\midrule \\[-2ex] \\\\[-5ex] \multicolumn{10}{l}{\hspace{2.5cm} \textbf{A}: \small {\textbf{Personal achievement}: \textit{Important to have success and be recognized}}}\\\\[-0.5ex]") ///
	 fragment ///
	 replace ///
	 
 
quietly: reg Consumerism Bologna  $controls $FE  if University==1, vce(cluster Country)
gen sample_e=e(sample)

quietly eststo e1: reg Consumerism Bologna   if University==1 & short==1 & sample_e==1, vce(cluster Country)
	quietly: sum Consumerism if short==1 & University==1
	estadd scalar ymean = r(mean)

		
quietly eststo e2: reg Consumerism Bologna $controls $FE if University==1 & short==1, vce(cluster Country)
	quietly: sum Consumerism if short==1 & University==1
	estadd scalar ymean = r(mean)
	
quietly eststo e2y: reg Consumerism Bologna $controls $FE if University==1 & short==1  & yrbrn<1987, vce(cluster Country)
	quietly: sum Consumerism if short==1 & University==1 & yrbrn<1987
	estadd scalar ymean = r(mean)
	
quietly eststo e3: reg Consumerism Bologna $controls $FE if University==1 & short==1 & ImmigrantN==0, vce(cluster Country)
	quietly: sum Consumerism if short==1 & University==1  & ImmigrantN==0
	estadd scalar ymean = r(mean)  
	
 replace Bologna=Bologna2
 replace trend=trend2  

	quietly eststo e4: reg Consumerism Bologna $controls $FE if University==1 & short==1, vce(cluster Country)
	quietly: sum Consumerism if short==1 & Eduyears>14   
	estadd scalar ymean = r(mean)	
	
 replace Bologna=Bologna2
 replace trend=trend2  

quietly eststo e5: reg Consumerism Bologna $controls $FE if University==1 & short==1 , vce(cluster Country)
	quietly: sum Consumerism if short==1 & University==1 
	estadd scalar ymean = r(mean)

use "ESS.dta", clear

quietly eststo e6: reg Consumerism Bologna $controls $FE if University==1 & short==1 & Jump==0, vce(cluster Country)
	quietly: sum Consumerism if short==1 & University==1  & Jump==0
	estadd scalar ymean = r(mean)
	
	g E3=Consumerism
	replace Consumerism= Consumerism_ordinal
quietly eststo e7: reg Consumerism Bologna $controls $FE if University==1 & short==1, vce(cluster Country)
	quietly: sum Consumerism if short==1 & University==1
	estadd scalar ymean = r(mean)
	replace Consumerism=E3
	
quietly eststo e8: reg Consumerism Bologna $controls $FE if University==1 , vce(cluster Country)
	quietly: sum Consumerism if  University==1
	estadd scalar ymean = r(mean)
	
	 replace Bologna=Bologna_g
 quietly eststo e9: reg Consumerism Bologna $controls $FE if University==1 & short==1, vce(cluster Country)
	 quietly: sum Consumerism if short==1 & University==1
	 estadd scalar ymean = r(mean)
	 replace Bologna=replaceBologna
 	
quietly eststo e10: reg Consumerism Bologna c.Bologna#c.University University $controls $FE if short==1, vce(cluster Country)  
	quietly: sum Consumerism  if short==1 & University==1 
	estadd scalar ymean = r(mean)
	
	 noisily esttab  e1 e2 e3 e5 e4  e6 e7 e8 e9 e10 using "Table1a.tex", nolz  keep(Bologna  c.Bologna#c.University)  booktabs label  b(3) se(3)  star(* 0.10 ** 0.05 *** 0.01) nomtitles nonumbers stats(ymean  r2  N  , fmt(3 3  %9.0fc ) labels(`"Output mean"' `"\textit{R}-sq"'   `"N. obs"'     ))  coeflabels(Bologna "Reform" c.Bologna#c.University "Reform $\times$ Graduate") ///
	posthead("\hline \\[-1ex]   \multicolumn{11}{l}{\hspace{2.5cm}   \textbf{B}: \small {\textbf{Personal achievement}: \textit{Important of have money and buy expensive things}}} \\\\[-0.1ex]") ///
    prefoot("[1.5ex] \cmidrule(lr{0.15em}){1-11}" ) ///
	fragment  ///
	append 



quietly: reg Equality Bologna  $controls $FE  if University==1, vce(cluster Country)
gen sample_e=e(sample)

quietly eststo e1: reg Equality Bologna   if University==1 & short==1 & sample_e==1, vce(cluster Country)
	quietly: sum Equality if short==1 & University==1
	estadd scalar ymean = r(mean)
	
quietly eststo e2: reg Equality Bologna $controls $FE if University==1 & short==1, vce(cluster Country)
	quietly: sum Equality if short==1 & University==1
	estadd scalar ymean = r(mean)
	
quietly eststo e2y: reg Equality Bologna $controls $FE if University==1 & short==1 & yrbrn<1987, vce(cluster Country)
	quietly: sum Equality if short==1 & University==1  & yrbrn<1987
	estadd scalar ymean = r(mean)
	
quietly eststo e3: reg Equality Bologna $controls $FE if University==1 & short==1 & ImmigrantN==0, vce(cluster Country)
	quietly: sum Equality if short==1 & University==1  & ImmigrantN==0
	estadd scalar ymean = r(mean)  

	quietly eststo e4: reg Equality Bologna $controls $FE if University==1 & short==1, vce(cluster Country)
	quietly: sum Equality if short==1 & Eduyears>14   
	estadd scalar ymean = r(mean)	
	
 replace Bologna=Bologna2
 replace trend=trend2  

quietly eststo e5: reg Equality Bologna $controls $FE if University==1 & short==1 , vce(cluster Country)
	quietly: sum Equality if short==1 & University==1 
	estadd scalar ymean = r(mean)

use "ESS.dta", clear

quietly eststo e6: reg Equality Bologna $controls $FE if University==1 & short==1 & Jump==0, vce(cluster Country)
	quietly: sum Equality if short==1 & University==1  & Jump==0
	estadd scalar ymean = r(mean)	
	
	g E2=Equality
	replace Equality=Equality_ordinal
quietly eststo e7: reg Equality Bologna $controls $FE if University==1 & short==1, vce(cluster Country)
	quietly: sum Equality if short==1 & University==1
	estadd scalar ymean = r(mean)
	replace Equality=E2
	
quietly eststo e8: reg Equality Bologna $controls $FE if University==1 , vce(cluster Country)
	quietly: sum Equality if  University==1
	estadd scalar ymean = r(mean)
	
	 replace Bologna=Bologna_g
 quietly eststo e9: reg Equality Bologna $controls $FE if University==1 & short==1, vce(cluster Country)
	 quietly: sum Equality if short==1 & University==1
	 estadd scalar ymean = r(mean)
	 replace Bologna=replaceBologna
	
 
quietly eststo e10: reg Equality Bologna c.Bologna#c.University University $controls $FE if short==1, vce(cluster Country)  
	quietly: sum Equality  if short==1 & University==1 
	estadd scalar ymean = r(mean)
		 noisily esttab  e1 e2 e3  e5 e4 e6 e7 e8 e9 e10 using "Table1a.tex", nolz  keep(Bologna  c.Bologna#c.University)  booktabs label  b(3) se(3)  star(* 0.10 ** 0.05 *** 0.01) nomtitles nonumbers stats(ymean  r2  N  , fmt(3 3  %9.0fc ) labels(`"Output mean"' `"\textit{R}-sq"'   `"N. obs"'     ))  coeflabels(Bologna "Reform" c.Bologna#c.University "Reform $\times$ Graduate") ///
	posthead("\hline \\[-1ex]   \multicolumn{11}{l}{\hspace{2.5cm}   \textbf{C}: \small {\textbf{Global justice}: \textit{Important that everyone has equal opportunity worldwide}}} \\\\[-0.1ex]") ///
     prefoot("[1.5ex] \cmidrule(lr{0.15em}){1-11}" ) ///
	fragment  ///
	append 


quietly: reg Environment Bologna  $controls $FE  if University==1, vce(cluster Country)
gen sample_e=e(sample)

quietly eststo e1: reg Environment Bologna   if University==1 & short==1 & sample_e==1, vce(cluster Country)
	quietly: sum Environment if short==1 & University==1
	estadd scalar ymean = r(mean)
		
quietly eststo e2: reg Equality Bologna $controls $FE if University==1 & short==1 & yrbrn<1987, vce(cluster Country)
	quietly: sum Environment if short==1 & University==1 & yrbrn<1987
	estadd scalar ymean = r(mean)

quietly eststo e2y: reg Equality Bologna $controls $FE if University==1 & short==1, vce(cluster Country)
	quietly: sum Environment if short==1 & University==1
	estadd scalar ymean = r(mean)
	
quietly eststo e3: reg Environment Bologna $controls $FE if University==1 & short==1 & ImmigrantN==0, vce(cluster Country)
	quietly: sum Environment if short==1 & University==1  & ImmigrantN==0
	estadd scalar ymean = r(mean)  

	quietly eststo e4: reg Environment Bologna $controls $FE if University==1 & short==1, vce(cluster Country)
	quietly: sum Environment if short==1 & Eduyears>14   
	estadd scalar ymean = r(mean)	
	
 replace Bologna=Bologna2
 replace trend=trend2  

quietly eststo e5: reg Environment Bologna $controls $FE if University==1 & short==1 , vce(cluster Country)
	quietly: sum Environment if short==1 & University==1 
	estadd scalar ymean = r(mean)

use "ESS.dta", clear


	
	g E4=Environment
	replace Environment=Environment_ordinal
quietly eststo e7: reg Environment Bologna $controls $FE if University==1 & short==1, vce(cluster Country)
	quietly: sum Environment if short==1 & University==1
	estadd scalar ymean = r(mean)
	replace Environment=E4
	
quietly eststo e8: reg Environment Bologna $controls $FE if University==1 , vce(cluster Country)
	quietly: sum Environment if  University==1
	estadd scalar ymean = r(mean)
	
	 replace Bologna=Bologna_g
 quietly eststo e9: reg Environment Bologna $controls $FE if University==1 & short==1, vce(cluster Country)
	 quietly: sum Environment if short==1 & University==1
	 estadd scalar ymean = r(mean)
	 replace Bologna=replaceBologna
	
 
quietly eststo e10: reg Environment Bologna c.Bologna#c.University University $controls $FE if short==1, vce(cluster Country)  
	quietly: sum Environment  if short==1 & University==1 
	estadd scalar ymean = r(mean)
	
	 noisily esttab  e1 e2 e3 e5 e4  e6 e7 e8 e9 e10 using "Table1a.tex", nolz  keep(Bologna  c.Bologna#c.University)  booktabs label  b(3) se(3)  star(* 0.10 ** 0.05 *** 0.01) nomtitles nonumbers stats(ymean  r2  N  , fmt(3 3  %9.0fc ) labels(`"Output mean"' `"\textit{R}-sq"'   `"N. obs"'     ))  coeflabels(Bologna "Reform" c.Bologna#c.University "Reform $\times$ Graduate") ///
	posthead("\hline \\[-1ex]   \multicolumn{11}{l}{\hspace{2.5cm}   \textbf{D}: \small {\textbf{Global justice}: \textit{Important to care for  nature}}} \\\\[-0.1ex]") ///
	prefoot("[1.5ex] \cmidrule(lr{0.15em}){1-11}") /// 
  	postfoot("\toprule  \multicolumn{11}{l}{\hspace{2.5cm}  \small \scshape Common modelling assumptions}\\\\[-1ex] " ///
    "SES Controls &  no  &  yes  & yes &   yes  &   yes &   yes &   yes &   yes &   yes &   yes \\" ///
	"Cohorts &  78-92  &  78-92  & 78-92 &   72-98  &   78-92 &   78-92 &   78-92 &   73-97 &   78-92 &   78-92 \\" ///
    "Round FE  &  no  &  yes  & yes &   yes  &   yes &   yes &   yes &   yes &   yes &   yes \\" ///
	"Country FE  &  no  &  yes  & yes &   yes  &   yes &   yes &   yes &   yes &   yes &   yes \\" ///
    "Cohort FE  &  no  &  yes  & yes &   yes  &   yes &   yes  &   yes &   yes &   yes &   yes \\  \toprule \end{tabular}  \begin{tablenotes} \setlength\labelsep{0pt}  \item \scriptsize {\textit{Notes.} Standard errors in parentheses. \sym{*} \(p<0.01\), \sym{**} \(p<0.05\), \sym{***} \(p<0.01\). Includes data from Albania, Austria, Belgium, Croatia, Czech Republic, Denmark, Estonia, Finland, France, Germany, Hungary, Ireland, Italy, Latvia, Lithuania,  the Netherlands, Norway, Poland, Portugal, Slovakia, Slovenia, Spain - United Kingdom and Israel are 'never treated' (see Table A1 for reforms' coding). Controls include sex, migration status (0: native, 1: foreign born), and a trend capturing the distance from the pivotal cohort.  Each specification is discussed in details in section 3.2.   The OLS naive specification is based on the effective sample of the TWFE Main specification for comparability. Column 3 runs the main analysis after deleting immigrants, column 4 after deleting three countries that experienced an increase in enrollment (see SI for details), column 5 includes respondents that did not graduate but completed at least 15 years of education, and column 6 uses the average rather than minimum entry age at university to establish the intention to treat cutoff. Self-interest and universalism have been dichotomized for ease of interpretation in all specification other than 'Ordinal DV' in column 7. Column 8 expands the bandwidths by 5 years, while column 9 considers a continuous intention to treat following the coding of the reform implementation. Column 10 provides the triple staggered difference-in-difference specification discussed in the text.}  \end{tablenotes}   \end{threeparttable}   \end{center}  \end{table}" ) ///
	fragment ///
	append  	
	
	